Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added possibility to provide JSON/YAML Factory to initialise ObjectMapper #4396

Conversation

MateuszPol
Copy link
Contributor

This PR add possibility to provide JsonFactory and YamlFactory when creating ObjectMapper using ObjectMapperFactory.

Change is pretty generic, but it's mainly related to SnakeYaml limit in parsing object size which is by default set on 3MB.

In this case we can provide YamlFactory with limit changed to any value user want.

- Added public methods to ObjectMapperFactory to give possibility to create mapper with custom factory
@MateuszPol MateuszPol merged commit 769941a into master Apr 28, 2023
@MateuszPol MateuszPol deleted the ft/Added_possibility_to_provide_Json_yaml_factory_to_mapper_initializer branch April 28, 2023 07:49
@pjfanning
Copy link
Contributor

This is also useful for Jackson 2.15.0 users as that version brings in StreamReadConstraints and users who don't like the defaults, can provide a JsonFactory with their own configured StreamReadConstraints instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants